package com.atguigu.factoryBean;

import org.springframework.beans.factory.FactoryBean;

public class MyBean implements FactoryBean<Bean1> {
    /**
     * 返回不同类型的bean对象
     * @return
     * @throws Exception
     */
    @Override
    public Bean1 getObject() throws Exception {
        Bean1 bean1=new Bean1();
        bean1.setAuthor("刘明福");
        bean1.setName("<万国天枢>");
        return bean1;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
